package com.easyOrder.core.mq;

public enum TopicTag {
	callbackController(0, "Callback controller"),
	test(1, "MQ Test"),
	requisitionCreate(2, "Requisition create"),
	saleOrderCreate(3, "Sale order create"),
	receive(4, "Receipted order"), 
	requisitionVerify(5, "Requisition verify"),
	deliveryCreate(6, "Delivery Create"),	
	receiptCreate(7, "Receipt Create"),
	requisitionOrder(8, "Requisition order"),
	distributionComplete(9, "Distribution order complete"),
	reconciliationConfirm(10, "Reconciliation Confirm"),
	salesReturnConfirm(11, "Reconciliation Confirm"),
    rePrice(12,"reprice"),
    openDepartmentCreate(13, "Open API department create"),
	openDepartmentUpadte(14, "Open API department update"),
	openDepartmentDelete(15, "Open API department delete"),
	openBranchCreate(16, "Open API branch create"),
	openBranchUpadte(17, "Open API branch update"),
	openUserAdd(18, "Open API User Add"),
	openUserUpdate(19, "Open API user update"),
	openUserDelete(20, "Open API user delete"),
	openUserUpdatePassword(21, "Open API user delete"),
	saleOrderConfirm(22, "Sale order confirm"),
	saleOrderCancel(22, "Sale order cancel"),
	receiveV3(23, "Receipted order v3.0"),
    ;

	private Integer value;
	private String desc;
	
	private TopicTag(Integer value, String desc) {
		this.value = value;
		this.desc = desc;
	}
	public Integer getValue() {
		return value;
	}
	public void setValue(Integer value) {
		this.value = value;
	}
	/**
	 * @return the desc
	 */
	public String getDesc() {
		return desc;
	}
	/**
	 * @param desc the desc to set
	 */
	public void setDesc(String desc) {
		this.desc = desc;
	}
	
	private TopicTag(String desc) {
		this.desc = desc;
	}
	
	public static TopicTag parse(Integer value) {
        if (null == value) {
        	return null;
        }
        TopicTag [] coll = values();
        for (TopicTag item : coll) {
            if (item.getValue().equals(value)) {
                return item;
            }
        }
        return null;
    }
}
